composetable: Don't abort on unsupported escape sequences
authorMatthias Clasen <mclasen@redhat.com>
Thu, 28 Jan 2016 04:22:02 +0000 (23:22 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Thu, 28 Jan 2016 04:22:02 +0000 (23:22 -0500)
People might put all sorts of gunk in their .XCompose file, in
the hope that XLib makes sense of it. Even if we don't make sense
of it, we shouldn't abort, but instead ignore the lines we can't
understand. Pointed out in
https://bugzilla.redhat.com/show_bug.cgi?id=1301254

gtk/gtkcomposetable.c

index eaff054590202d4b166b211d2317a31d639ed67f..9b4cb15ef11092f7497e18bcde011422ae9fb07d 100644 (file)
@@ -104,7 +104,9 @@ parse_compose_value (GtkComposeData *compose_data,
         uch = g_ascii_strtoll(words[1] + 1, NULL, 8);
       /* If we need to handle other escape sequences. */
       else if (uch != '\\')
-        g_assert_not_reached ();
+        {
+          g_warning ("Invalid escape sequence: %s: %s", val, line);
+        }
     }
 
   if (g_utf8_get_char (g_utf8_next_char (words[1])) > 0)